import java.util.Scanner;

public class ScoreDemo {
    public static void main(String[] args) {
        //键盘输入本次Java考试五位同学的成绩，并求出最高分
        Scanner input = new Scanner(System.in);

        double[] scores =new double[5];

        for (int i=0;i<scores.length;i++){
            System.out.print("请输入第"+(i+1)+"位同学的成绩：");
            scores[i] = input.nextDouble();
        }
        //比较值
        double max = scores[0];
        for (double score:scores){
            if (max < score){
                max = score;
            }
        }
        System.out.print("本次Java考试成绩最高分："+max);


    }
}
